package com.forg.mvc.core;

import java.io.Serializable;

import javax.servlet.http.HttpServletRequest;

public class RequestWraper implements Serializable{
    
    private static final long serialVersionUID = -988216828239219353L;
    
    private HttpServletRequest r;
    
    private RequestMethodEnum m ;
    
    private String u;
    
    private RequestID i;
    
    private RequestParam p;

    public HttpServletRequest getRequest() {
        return r;
    }

    public RequestParam getRequestParams() {
        return p;
    }

    public String getRequestPath() {
        return u;
    }

    public RequestMethodEnum getRequestMethod() {
        return m;
    }

    public RequestID getRequestID() {
        return i;
    }
    
    public RequestWraper request(HttpServletRequest request){
        this.r = request;
        return this;
    }
    
    public RequestWraper method(RequestMethodEnum method){
        this.m = method;
        return this;
    }
    
    public RequestWraper path(String path){
        this.u = path;
        return this;
    }
    
    public RequestWraper param(RequestParam param){
        this.p = param;
        return this;
    }
    
    public RequestWraper id(RequestID id){
        this.i = id;
        return this;
    }
    
    @Override
    public String toString(){
        
        return i.toString();
    }
    
}
